<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>My notes</title>
<link rel="shortcut icon" href="__TMPL__Public/images/icon.png" />
<link type="text/css" rel="stylesheet" href="__TMPL__Public/css/common.css" media="all" />

<link type="text/css" rel="stylesheet" href="__TMPL__Index/css/admin.css" media="all" />

<link type="text/css" rel="stylesheet" href="__TMPL__Public/jquery/css/le-frog/jquery-ui-1.8.16.custom.css" media="all"  />
<script type="text/javascript" src="__TMPL__Public/jquery/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="__TMPL__Public/jquery/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="__TMPL__Public/js/common.js"></script>
<script type="text/javascript">
	$(function(){
		$(".delete_button").bind('click',this,deleteUser);
		$(".buttons").button().css("font-size","14px");
	});

	function deleteUser() {
		var user_id = $(this).attr('user_id');
		var that = this;
		$.get(APP_PATH + "User/deleteUser", {
			user_id : user_id
		}, function(result) {
			result = JSON.parse(result);
			if(result.status == 1) {
				alert("已删除");
				var tr = $(that).parent().parent();
				tr.remove();
				
			}
		});
	}
	
</script>
</head>
<body>
	<div id="main_panel">
		<h2>管理员页面</h2>
		
		<form action="__APP__/Index/admin" id="search_form">
			<span class="font_style1">搜索：</span><input type="text" name="name"/>
			<input type="submit" value="Go" id="search_button" class="buttons"/>
		</form>
		
		<p class="padding"></p>
		
		<table>
		<volist name="users" id="user">
			<tr>
				<td><span class="font_style1"></span>{$user.name}</td>
				<td><input type="button" value="删除" class="delete_button buttons" 
					user_id="{$user.id}"/></td>
			</tr>
		</volist>
		</table>
	</div>
<include file="Public:common"/>
</body>
</html>